package day05;
/**方法参数的演示*/
public class MethodDemo1 {
    public static void main(String[] args) {
        say();//调用say方法
        //sayHi();编译错误 有参必须传参
        say("zhangsan");
        say("wangwu",24);
        say("zed",66);//实参
        say(80);


        shouru("xiaoliu",25.6);
    }

    public static void shouru(String name,double money){
        System.out.println("大家好，我叫"+name+"，每年的收入是"+money+"万元");
    }

    public static void say(String name,int age){
        if(age>=60){//在某种特定的条件下，提前结束方法
            return;//就起一个作用 结束方法 只能同在无返回值中
        }//形参
        System.out.println("大家好，我叫"+name+"，今年"+age+"岁了");
    }

    public static void say(String name){
        System.out.println("大家好，我叫"+name+"，今年24岁了");
    }

    public static void say(double name){
        System.out.println("我"+name+"公斤");
    }

    //无参无返回值
    public static void say() {
        System.out.println("我叫ww我今年24岁了");
    }
    public static void say(int age){}
    public static void say(int age,String name){}


}
